<?php

namespace app\cps\validate;

use think\Validate;
use app\common\Error;

class Pitcher extends Validate
{
    protected $rule = [
        'id' => 'require',
        'name' => 'require',
        'password' => 'require',
        'official_account_id' => 'require',
    ];

    protected $message = [
        'id.require' => Error::ID_NOT_EXIXTS,
        'name.require' => Error::NAME_NOT_EXIXTS,
        'password.require' => Error::PASSWORD_NOT_EXIXTS,
        'official_account_id.require' => Error::OFFICIAL_ACCOUNT_ID_NOT_EXIXTS,
    ];

    protected $scene = [
        'add' => ['name', 'password', 'official_account_id'],
        'edit' => ['id', 'name', 'password', 'official_account_id'],
        // 'delete' => ['id'],
        'detail' => ['id'],
    ];
}